package com.example.test.webinterfacetest.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.test.webinterfacetest.mapper.ImgFileInfoMapper;
import com.example.test.webinterfacetest.po.ImgFileInfo;
import com.example.test.webinterfacetest.service.ImgFileInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 配置中心-影像资料配置-影像资料类别配置表(ImgFileInfo)表服务实现类
 *
 * @author makejava
 * @since 2022-12-19 13:01:13
 */
@Service("imgFileInfoService")
public class ImgFileInfoServiceImpl extends ServiceImpl<ImgFileInfoMapper, ImgFileInfo> implements ImgFileInfoService {

    @Resource
    private ImgFileInfoMapper imgInfoMapper;

    @Override
    public List<ImgFileInfo> getAll() {
        return imgInfoMapper.selectList(null);
    }

    @Override
    public List<ImgFileInfo> getByConditions(String fileLevel) {
        QueryWrapper<ImgFileInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("FILE_LEVEL", fileLevel);
        return imgInfoMapper.selectList(queryWrapper);
    }
}

